/* Author: Panos Sakkos 2011 
 * Email: p.sakkos@di.uoa.gr
 */

class CL
{
	private:
		int size;
		double *values;
	public:
		CL(int size);
		double GetValue(int i, int j);
		void SetValue(int i, int j, double value);
};

class CU
{
	private:
		int size;
		double *values;
	public:
		CU(int size);	
		double GetValue(int i, int j);
		void SetValue(int i, int j, double value);
};

class Diagonal
{
	private:
		int size;
		double *values;
	public:
		Diagonal(int size);
		double GetValue(int i, int j);
		void SetValue(int i, int j, double value);
};

class Trigonal
{
	private:
		int size;
		CU upper; 
		Diagonal diagonal;
		CL lower;
	public:
		Trigonal(int size);
		void SetValue(int i, int j, double value);
		double GetValue(int i, int j);
		void ReadInput(void);
};